home *** CD-ROM | disk | FTP | other *** search
- 0 gosub60100:print"[147]":x=rnd(-ti):poke53280,13:poke53281,1
- 5 print""spc(12)"bulls and bears[146]":print""
- 10 dimn$(20),d(20),p(20),c(20),p1(20),p2(20),sp(12),b(20),i$(9),s(20)
- 15 c=7:gosub980:print"[144]number of players (1/2)"
- 16 geta$:ifa$<"1"ora$>"2"then16
- 17 np=val(a$)
- 20 ifnp>2ornp<1thenprint"[145][145]":goto15
- 25 c=9:gosub980:print"[144]player 1 initials:";:al=1:nu=.:le=3:gosub60500:p1$=c$
- 30 iflen(p1$)<>3thenprint"[145][145][145]":goto25
- 35 ifnp=1then50
- 40 print:gosub980:print"player 2 initials:";:gosub60500:p2$=c$
- 45 iflen(p2$)<>3thenprint"[145][145][145]":goto40
- 50 yr=1:i3=6:m(1)=10000:m(2)=10000:pl=1
- 55 forx=1to12:readn$(x),d(x):p(x)=100:next
- 60 p(11)=120:forx=1to8:readi$(x):next:forx=13to20:readn$(x),p(x):next
- 65 print"[147]":s1=0:s2=0:forx=1to20:s1=s1+p1(x)*p(x):s2=s2+p2(x)*p(x):next
- 70 n1=int(m1*.02):n2=int(m2*.02)
- 75 ifm(1)<0thenn1=n1-int(m(1)*.02)
- 80 ifm(2)<0thenn2=n2-int(m(2)*.02)
- 85 m(1)=m(1)-n1+d1:m(2)=m(2)-n2+d2:t1=s1+m(1)-m1:t2=m(2)+s2-m2
- 90 print" year:"yr" quarter:"q:gosub1025
- 95 printtab(18)p1$:printtab(18)"[192][192][192]"
- 100 print"stocks"spc(15-len(str$(s1)))""s1
- 105 ifm(1)<0thenprint"[144]cash"spc(17-len(str$(m(1))))""m(1):goto115
- 110 print"[144]cash"spc(17-len(str$(m(1))))""m(1)
- 115 print"[144]dividends"spc(12-len(str$(d1)))""d1
- 120 print"[144]margins"spc(14-len(str$(m1)))""m1
- 125 print"[144]interest"spc(13-len(str$(n1)))""n1
- 130 printspc(15)"[144][192][192][192][192][192][192]":print"total"spc(16-len(str$(t1)))t1
- 135 ifnp=1then175
- 140 print""spc(30)"[144]"p2$:printspc(30)"[192][192][192]"
- 145 printspc(33-len(str$(s2)))""s2
- 150 ifm(2)<0thenprintspc(33-len(str$(m(2))))""m(2):goto160
- 155 printspc(33-len(str$(m(2))))""m(2)
- 160 printspc(33-len(str$(d2)))""d2
- 165 printspc(33-len(str$(m2)))""m2:printspc(33-len(str$(n2)))n2
- 170 printspc(27)"[144][192][192][192][192][192][192]":printspc(33-len(str$(t2)))t2
- 175 print:print:print"press space[146] to continue or q[146] to quit":poke198,0
- 180 geta$:ifa$=""then180
- 182 ifa$="q"then60000
- 185 ifa$<>chr$(32)then180
- 190 ifbr(1)=1orbr(2)=1then1105
- 195 ifyr=10andq=4then1105
- 200 print"[147]":gosub1090
- 205 ifen>9theny=y-1
- 210 ifen<-5theny=y+1
- 215 en=en+y:c1=y:gosub1090
- 220 ifi1>9theny=y-1
- 225 ifi1<-5theny=y+1
- 230 i1=i1+c1+y:c2=c1+y:gosub1090
- 235 ify=-2theny=0
- 240 i2=i2+c2+y:c3=c2+y:gosub1090:i3=i3+y:c4=y
- 245 ifi2<-6theni2=i2+1:c3=c3+1
- 250 ifi1-i3>2theni3=i3+1:c4=c4+1
- 255 ifi1-i3<-2theni3=i3-1:c4=c4-1
- 260 ifi3<2theni3=2:c4=0
- 265 ifi3<5theni1=i1+1:c2=c2+1
- 270 ifi3>12theni1=i1-1:c2=c2-1
- 275 d(12)=i3-2
- 280 ifd(12)<4thend(12)=4
- 285 ifd(12)>9thend(12)=9
- 290 gosub1100:c(1)=(c3-c4)*y:c(11)=-(10*c4)
- 295 ifp(11)>160thenc(11)=0
- 300 ifp(11)<70thenc(11)=c(11)+5
- 305 gosub1100:c(4)=(c2+c3)*y:gosub1100:c(5)=(c2+c3)*y-2
- 310 gosub1100:c(9)=c1*y*2:gosub1100:c(7)=(c3-c4-c1)*y
- 315 gosub1100:c(6)=c3*y:gosub1100:c(3)=-(c1+c4)*y*2
- 320 gosub1100:c(10)=(c2+c4)*y*2:gosub1100:c(2)=-(c2+c4)*y*2
- 325 gosub1100:c(8)=-c1*y:c(9)=c(9)+c1:c(10)=c(10)+(5*c2):gosub1100
- 330 ifi2>5thenc(4)=c(4)+y:c(7)=c(7)+y:c(6)=c(6)+y
- 335 ifi2<0thenc(4)=c(4)-y:c(7)=c(7)-(y*2):c(6)=c(6)-(y*2)
- 340 gosub1100
- 345 ifi3>10thenc(1)=c(1)-(2*y):c(2)=c(2)-(3*y):c(3)=c(3)-y
- 350 ifi3<5thenc(1)=c(1)+(2*y):c(2)=c(2)+(3*y):c(3)=c(3)+y
- 355 forx=1to10:y=int(rnd(1)*10)
- 360 ify>6theny=y-10
- 365 c(x)=c(x)+(2*y):next
- 370 forx=1to11
- 375 ifb(x)=1thenp(x)=100:b(x)=0
- 380 p(x)=p(x)+c(x)
- 385 ifp(x)=<0thenp(x)=0:b(x)=1
- 390 ifp(x)>199thenp(x)=int(p(x)/2):sp(x)=1
- 395 next
- 400 forx=1to10:ifsp(x)=0thennext:goto410
- 405 p1(x)=p1(x)*2:p2(x)=p2(x)*2:sp(x)=1:next
- 410 forx=13to(12+ip)
- 415 ifb(x)=0thennextx:goto430
- 420 ifb(x)=1thenb(x)=2
- 425 next
- 430 forx=13to(12+ip):gosub1090:p(x)=p(x)+y
- 435 ifp(x)>0thennext:goto450
- 440 ifb(x)=2thennext:goto450
- 445 p1(x)=0:p2(x)=0:p(x)=0:b(x)=1:next
- 450 q=q+1:ifq=5thenq=1:yr=yr+1
- 455 ifnp=1orpl=1then470
- 460 pl$=p2$:m=m(2):mt=m2:tl=m-mt
- 463 forx=1to20:s(x)=p2(x):tl=tl+s(x)*p(x):next
- 465 goto475
- 470 pl$=p1$:m=m(1):mt=m1:tl=m-mt
- 473 forx=1to20:s(x)=p1(x):tl=tl+s(x)*p(x):next
- 475 gosub1035:iftl<0thenbr(pl)=1
- 480 print"[147]":print"year:"yr" quarter:"q" player: "pl$
- 485 print"[144]stk div prc chg shrs [221]stk prc shrs"
- 490 print"[192][192][192] [192][192][192] [192][192][192] [192][192][192] [192][192][192][192] [221][192][192][192] [192][192][192] [192][192][192][192]"
- 495 forx=1to12:y=len(str$(s(x))):y1=len(str$(p(x))):z=len(str$(c(x)))
- 500 print""n$(x)" "d(x)spc(4-y1)p(x)spc(3-z)c(x)spc(6-y)s(x)"[144][221]":next
- 505 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 510 ifpl=2then585
- 515 ifq<>1oryr>8then525
- 520 gosub1030:nw=1:ip=ip+1:printspc(6)"new issue: "i$(ip)
- 525 forx=1to12+ip
- 530 ifb(x)<>1thennext:goto545
- 535 ifnw=0thengosub1030:nw=1
- 540 printspc(6)""n$(x)" declares bankruptcy":next
- 545 forx=1to11
- 550 ifsp(x)=0thennext:goto565
- 555 ifnw=othengosub1030:nw=1
- 560 printspc(6)""n$(x)" declares 2-for-1 split":sp(x)=0:next
- 565 ifnw=0then585
- 570 forx=1to3000:next
- 575 nw=0:l=15:gosub985
- 580 forx=1to6:printspc(5)" ":next
- 583 l=15:gosub985
- 585 print"[145]"spc(23)"[144][179]"
- 590 ifbr(pl)=1thenprint" bankrupt[146]":print"[145]"spc(23)"[144][221]":goto605
- 595 ifmc>0thenprint:goto605
- 600 print" [144]b[146]uy s[146]ell e[146]xit [221]"
- 605 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 610 print"":print:print
- 615 forx=13to12+ip:y=len(str$(s(x))):z=9-len(str$(p(x)))
- 620 ifb(x)=2thennext:goto630
- 625 printspc(24)"[156]"n$(x)" "p(x)spc(z-y)s(x):next
- 630 l=10:gosub985:printspc(23)"[144][171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
- 635 printspc(26)" [129]indexes[146]"
- 640 printspc(24)" energy "en:printspc(24)" economy "i2
- 645 printspc(24)" interest "i3:printspc(24)" inflation "i1
- 650 printspc(23)"[144][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
- 655 print"cash="m:print"comm="cm:print"marg="mt
- 660 print"[145][145][145]"spc(15)"[144][221]":printspc(15)"[221]":printspc(15)"[221]"
- 665 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
- 670 ifbr(pl)=0then680
- 675 forx=1to2000:next:goto1050
- 680 ifmc=0then700
- 685 l=15:gosub985:print" margin call:[146]"mc
- 690 print"[145]"spc(23)"[144][221]"
- 695 gosub825:mc=mc-x:ifmc>0thenprint"[145][145]"spc(14)" ":goto685
- 700 fl=-1:poke198,.
- 701 print"";
- 702 if(fl)thenprint" [144]b[146]uy s[146]ell e[146]xit "
- 705 ifnot(fl)thenprint" [144] uy ell xit "
- 710 geta$:ifa$=""thenfl=not(fl):goto701
- 711 print" [144]b[146]uy s[146]ell e[146]xit "
- 715 ifa$="b"thengosub735:goto701
- 720 ifa$="s"thengosub825:goto701
- 725 ifa$="e"then1050
- 730 fl=not(fl):goto701
- 735 gosub950:mr=0:printspc(21)"[144]buy on margin?":poke198,0
- 740 geta$:ifa$=""then740
- 745 ifa$="y"thenmr=1:goto755
- 750 ifa$<>"n"then740
- 755 gosub990:ifa$="x"thenreturn
- 760 ifmr=0then775
- 765 ifm-z/2<-1000thengosub955:gosub1020:goto765
- 770 mt=mt+int(z/2):m=m-int(z/2):goto785
- 775 ifm-z<-1000thengosub955:gosub1020:goto775
- 780 m=m-z:ifx=0then795
- 785 s(y)=s(y)+x
- 790 z=int(x*.1)+1:m=m-z:cm=cm+z+10
- 795 gosub950
- 800 printtab(7)" "spc(4)" "
- 805 printtab(7)" "spc(4)" "
- 810 printtab(7)" "spc(4)" "
- 815 gosub950:print"cash="m:print"comm="cm:print"marg="mt
- 820 gosub890:gosub950:return
- 825 gosub990:ifa$="x"then845
- 830 ifx>s(y)thengosub960:gosub1020:goto830
- 835 m=m+z:s(y)=s(y)-x:gosub790
- 840 ifmt=0thengosub940:return
- 845 printspc(22)"[144]pay margin?":poke198,0
- 850 geta$:ifa$=""then850
- 855 ifa$="y"then870
- 860 ifa$="n"thengosub940:return
- 865 goto850
- 870 c=22:gosub980:print"amount:";:nu=1:al=.:le=8:gosub60500:x=val(c$)
- 875 ifm-x<-1000thengosub955:goto870
- 880 ifx>mtthenx=mt
- 885 m=m-x:mt=mt-x:goto795
- 890 z=len(str$(s(y)))
- 895 ify>12then915
- 900 ify=0thenreturn
- 905 l=y+1:gosub985:printspc(17)" "
- 910 print"[145]"spc(22-z)s(y):return
- 915 l=y-11:forx=13toy:ifb(x)=2thenl=l-1
- 920 next:gosub985:printspc(32)"[156] "
- 925 print"[145]"spc(38-len(str$(s(y))))s(y):return
- 930 printtab(19)"incorrect input"
- 935 forx=1to2000:next
- 940 l=17:gosub985
- 945 forx=1to3:printtab(16)" ":next
- 950 l=17:gosub985:return
- 955 printtab(19)"not enough money":goto965
- 960 printtab(19)"not enough shares"
- 965 forx=1to2000:next:print"[145][145]"spc(21)" "
- 970 printtab(19)" "
- 975 l=18:gosub985:return
- 980 poke211,c:return
- 985 poke214,l:print:return
- 990 a$="x":y=0:gosub940:c=22:gosub980:print"[144]stock:";
- 992 al=1:nu=.:le=3:gosub60500:a$=c$
- 995 ifa$="x"thengosub940:return
- 1000 iflen(a$)<>3thengosub930:goto990
- 1005 forx=1to20:ifa$=n$(x)theny=x
- 1010 next
- 1015 ify=0thengosub930:goto990
- 1020 gosub980:x=0:print"[144]shares:";
- 1022 le=6:al=.:nu=1:gosub60500:x=val(c$):z=x*p(y):return
- 1025 print"[144] [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":return
- 1030 printspc(13)"[129]*market news*":return
- 1035 tl=m-mt:forx=1to20:tl=tl+p(x)*s(x):next
- 1040 ifmt>int(tl/2)thenmc=mt-int(tl/2):return
- 1045 mc=0:return
- 1050 cm=0:tr=0
- 1055 ifq<>4thend=int(d(12)/4)*s(12):goto1065
- 1060 forx=1to11:d=d+d(x)*s(x):next:d=d+(d(12)-3*int(d(12)/4))*s(12)
- 1065 ifpl=1then1075
- 1070 d2=d:d=0:pl=1:m(2)=m:m2=mt:forx=1to20:p2(x)=s(x):next:goto65
- 1075 d1=d:d=0:pl=2:m(1)=m:m1=mt:forx=1to20:p1(x)=s(x):next
- 1080 ifnp=1thenpl=1:goto65
- 1085 goto460
- 1090 y=int(rnd(1)*5):ify>2theny=y-5
- 1095 return
- 1100 y=int(rnd(1)*3)+1:return
- 1105 print:gosub1025
- 1108 ifnp=1andbr(1)=1thenprint" you are bankrupt":goto1150
- 1110 ifbr(1)=1andbr(2)=1then1175
- 1115 ifbr(1)=1thengosub2000:goto1150
- 1120 ifbr(2)=1thengosub2100:goto1150
- 1125 ifnp=1then1150
- 1130 ift1>t2thenpl$=p1$:goto1145
- 1135 ift2>t1thenpl$=p2$:goto1145
- 1140 print:print"[144] *no winner*[146]":goto1150
- 1145 print:print" "pl$" is the winner"
- 1150 print:print"[144] game over[146]--play again?":poke198,0
- 1155 geta$:ifa$=""then1155
- 1160 ifa$="y"thenclr:goto0
- 1165 ifa$<>"n"then1155
- 1170 goto60000
- 1175 print" "p1$" is bankrupt "p2$" is bankrupt":goto1140
- 1180 databnk,2,fin,6,utl,5,con,2,def,0,mfg,1
- 1185 datagmc,3,twa,0,exo,4,min,0,bnd,8,mkt,4
- 1190 data wildcat drilling,genetic research,gold nugget mine
- 1195 data diode electronics,urban development,texas exploration
- 1200 data energy associates,dooms day mining
- 1205 data wil,2,gen,5,gol,2,dio,4,urb,4,tex,2,ena,5,dom,2
- 2000 print" "p1$" is bankrupt "p2$" is the winner":return
- 2100 print" "p2$" is bankrupt "p1$" is the winner":return
- 60000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
- 60010 ifer<>63thenend
- 60020 load"hello connect",8
- 60100 poke53280, 6:poke53281, 0:print"[147][142]";
- 60110 print"loadstarpresents"
- 60120 print"[164][164][164][164][164][164][164][164][164][164] [146][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] bulls a";
- 60130 print"nd bears [146][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] [146][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]";
- 60140 print"[164][164][164][164][164] by kirk ward [146][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] [146]";
- 60150 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] copyright 1988 [146][164][164][164][164][164][164][164][164][164][164][164] ";
- 60160 print" "
- 60170 print"pressspacetocontinue"
- 60180 ifpeek(203)<>60then60180
- 60190 return
- 60500 c$="":poke198,.:print"[164]";
- 60510 fora=1tole+1
- 60520 geta$:ifa$=""then60520
- 60530 ifa$=chr$(13)thenprint"[157] ":return
- 60540 ifa$=chr$(20)anda>1thenprint"[157][157] [157][157][164]";:a=a-1:c$=left$(c$,a-1):goto60520
- 60550 if(a=le+1)then60520
- 60560 if(nu)and((a$>="0")and(a$<="9"))then60595
- 60570 if(al)and((a$>=" "anda$<="/")or(a$>=":"anda$<="z"))then60595
- 60580 if(al)thenif(a$>="[193]"anda$<="[218]")then60595
- 60590 goto60520
- 60595 print"[157]"a$;:poke212,.:print"[164]";:c$=c$+a$:next
-